package com.zhxy.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@MapperScan("com.zhxy.mapper")
public class MyConfig {

    /**
     * 分页查询插件
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        //paginationInterceptor().setLimit(最大单页限制数量)
        return new PaginationInterceptor();
    }
}
